import jarvars
import os

def saveConfiguration():
    path = __file__
    print path
    path = os.path.abspath(__file__)
    print path
    path = os.path.normpath(os.path.split(path)[0]+"/jarvars.py")
    print "Saving to", path
    f = open(path, 'w')
    f.write("AuthorizedAimUsers="+str(jarvars.AuthorizedAimUsers)+'\n')
    f.write("AuthorizedCodes="+str(jarvars.AuthorizedCodes)+'\n')
    f.write("Lights="+str(jarvars.Lights)+'\n')
    f.write("State="+str(jarvars.State)+'\n')
    f.write("LightsOn="+str(jarvars.LightsOn)+'\n')
    f.write("numLightsOn="+str(jarvars.numLightsOn)+'\n')
    f.close()
    print "Save Function here"
    return

if __name__ == "__main__":
    saveConfiguration()
